using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;


namespace Infrastructure.Interface
{
    /// <summary>
    /// 定义删除实体的接口
    /// <remarks></remarks>
    /// </summary>
    /// <typeparam name="T">实体类型</typeparam>
    public interface IRemovable<T> where T : IEntity
    {
        /// <summary>
        /// 移除实体
        /// </summary>
        /// <param name="id">实体ID</param>
        /// <returns></returns>
        void Remove(Guid id);


        /// <summary>
        /// 移除实体
        /// </summary>
        /// <param name="ids">多个实体的ID</param>
        /// <returns></returns>
        void Remove(IEnumerable<Guid> ids);


        /// <summary>
        /// 移除实体
        /// </summary>
        /// <param name="entityArray">多个实体</param>
        /// <returns></returns>
        void Remove(IEnumerable<T> entityArray);


        /// <summary>
        /// 批量移除
        /// </summary>
        /// <param name="filter">条件</param>
        /// <returns></returns>
        void Remove(Expression<Func<T, bool>> filter);

    }
}
